// dlg.txt

//MK Edit

//mark_quest_dest(zone,x,y,layer,quest);
//	code =
//		sf(,,2);
//		toggle_quest(19,10);
//		award_party_xp(MED_QUEST_XP);
//	break;

begintalkscript;

variables;

short this_town = 32;

begintalknode;
	tag = 1;
	condition = get_sdf(this_town,1) == 0;
	text1 = "You enter the Khorfax Quarry. It's a massive, glorious source of good building stone, burrowed into the mountain walls of the Low Dhaga. It's also a mess.";
	text2 = "There are no guards. Or workers. This clearing is used to load wagons with bricks and blocks, but everything is being neglected.";
	text3 = "It's not safe to leave your mines unwatched in the Rokaj. Some enterprising clan will rush in and claim it. Something is off here.";
	code =
		sf(this_town,1,1);
	break;
	
begintalknode;
	tag = 2;
	condition = get_sdf(this_town,2) == 0;
	text1 = "You emerge into the wide open floor of the quarry and get an immediate idea of what is wrong here.";
	text2 = "There are several campsites, each marked with its own smoky fire. Each camp has a band of raiders, but they are all from different clans. All want the quarry, but none are strong enough to claim it.";
	text3 = "Each camp sends out patrols, but none of them are strong enough to challenge the others. Reclaiming the quarry will take some fighting.";
	code =
		sf(this_town,2,1);
	break;

begintalknode;
	tag = 3;
	condition = get_sdf(this_town,3) == 0;
	text1 = "At the north end of the hall, you find that you have interrupted a brawl in progress. Warriors from two clans of raiders are facing each other in a tense stalemate.";
	text2 = "It seemed for a moment like they were going to be cautious and withdraw. When they see you, however, each side thinks you are there to help the other. They panic ...";
	code =
		sf(this_town,3,1);
		set_attitude(30006,10);
		set_attitude(30007,11);
		set_act_at_dist(30006,1);
		set_act_at_dist(30007,1);
		set_summon_level(30006,1);
		set_summon_level(30007,1);
	break;

begintalknode;
	tag = 4;
	condition = get_sdf(this_town,4) == 0;
	text1 = "Behind you, you hear shouting and the running of booted feet. Someone has entered the hall from downstairs.";
	code =
		sf(this_town,4,1);
		alert_char(30009);
		activate_hidden_group(10);
		set_name(3257,"Sandwind Raider");
	break;

begintalknode;
	tag = 5;
	condition = get_sdf(this_town,5) == 0;
	text1 = "__";
	code =
		sf(this_town,5,1);
	break;

begintalknode;
	tag = 6;
	condition = get_sdf(this_town,6) == 0;
	text1 = "__";
	code =
		sf(this_town,6,1);
	break;

begintalknode;
	tag = 7;
	condition = get_sdf(this_town,7) == 0;
	text1 = "__";
	code =
		sf(this_town,7,1);
	break;

begintalknode;
	tag = 8;
	condition = get_sdf(this_town,8) == 0;
	text1 = "__";
	code =
		sf(this_town,8,1);
	break;

begintalknode;
	tag = 9;
	condition = get_sdf(this_town,9) == 0;
	text1 = "__";
	code =
		sf(this_town,9,1);
	break;

begintalknode;
	tag = 10;
	condition = get_sdf(this_town,10) == 0;
	text1 = "__";
	code =
		sf(this_town,10,1);
	break;

begintalknode;
	tag = 11;
	condition = get_sdf(this_town,11) == 0;
	text1 = "__";
	code =
		sf(this_town,11,1);
	break;

begintalknode;
	tag = 12;
	condition = get_sdf(this_town,12) == 0;
	text1 = "__";
	code =
		sf(this_town,12,1);
	break;

// MIXED

begintalknode;
	tag = 13;
	condition = 1;
	text1 = "The door is held shut with a massive padlock. It's heavy timber and would take a long time to break down. To get in, you will need the key.";

begintalknode;
	tag = 14;
	condition = 1;
	text1 = "You deliver Bhruck a mortal wound. He bellows an incoherent cry of rage and rushes at you, determined to slay you with one final blow. He collapses in three steps. Thus ends the Claw Clan.";
	text2 = "He wears a key on a leather thong around his neck. You take it.";
	text3 = "It seems like this quarry is yours now. You still need people to work it, though. Maybe someone in Azam can help.";
	
begintalknode;
	tag = 15;
	condition = 1;
	text1 = "This jar is full of dry, ground, orange clay. Part of your education was learning about everything that can be extracted from your vassals to enrich the Empire. You recognize this stuff as ochre, a valuable pigment.";
	text2 = "Unfortunately, this jar has been tainted with dirt and sand. It's not valuable enough to be worth your notice.";
	text3 = "It's beautiful stuff: Pure, powdery, and richly colored. Very pretty. You grab a leather pouch and take some of it with you.";
	text4 = "You've already poked at this jar. You reseal it.";
	code =
		cs();
		as(1);
		if (gf(32,15) == 0) {
			sf(32,15,1);
			inc_flag(32,14,1);
			if (gf(32,14) == 3) {
				as(3);
				set_spec_item(17,1);
				}
				else as(2);
			}
			else as(4);
	break;
	
begintalknode;
	tag = 16;
	condition = 1;
	text1 = "The Khorfax has been restaffed with Dhagan workers. The quarry has been reclaimed and is now producing stone for you.";
	text2 = "The Ro here are suitably grateful and happy to show you around and answer your questions. Then they get back to work making you wealthier.";

begintalknode;
	tag = 17;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 18;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 19;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 20;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 21;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 22;
	condition = 1;
	text1 = "__";

////

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "You enter the quarry barracks and confront the master of the raiders. He is a massive Dhagan, brutally scarred, and clad in steel. He's quite an imposing figure, which is why he thought that he could actually hold this claim.";
	text2 = "When he sees who you are, he doesn't react as expected. He doesn't draw his blade. Instead, he points at you and furiously shouts, _Havenite! You have come to a raided claim. I am Bhruck of the Claw Clan, and I claim you are not supposed to be here!_";

begintalknode;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "_Why is this a problem?_";
	text1 = "_Did you learn nothing of us before you came here? This claim was abandoned. Raiders came to claim it, by Dhagan tradition._";

begintalknode;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "_You are our vassals. I can go wherever I want._";
	text1 = "_We are vassals, yes, but we have traditions and laws. Don't you know this claim was abandoned? We raiders are here by Dhagan tradition._";

begintalknode;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "_Uh. What?_";
	text1 = "Bhruck lets out a long, exasperated sigh. Then he says, in a slow voice, _This claim was abandoned. We raiders are here by Dhagan tradition._";

begintalknode;
	state = 11;
	nextstate = 12;
	condition = 1;
	question = "_And why is my being here a problem?_";
	text1 = "_Because the conflict here was legal. Raiders came to raid in the old way. We were testing each others' strength. Then you just come in and start chopping everyone down! We are traditional raiders!_";
	text2 = "Traditional or not, the Queen would have you punish any raiders in Ro lands.";
	
begintalknode;
	state = 12;
	nextstate = 13;
	condition = 1;
	question = "_The Low Dhaga is plagued by raiders._";
	text1 = "_It was. Outsider raiders, which wanted to cause trouble. By attacking you, for example. Raasa Lawita has been killing them fast, and good for him._";
	text2 = "_We have nothing to do with that lot._";

begintalknode;
	state = 12;
	nextstate = 13;
	condition = 1;
	question = "_Raiders tried to murder me._";
	text1 = "_We know. Disgusting business. Outsider raiders, not proper Dhagans. Raasa Lawita has been killing them fast, and good for him._";
	text2 = "_We have nothing to do with that lot._";

begintalknode;
	state = 12;
	nextstate = 13;
	condition = 1;
	question = "_I'm still not following this._";
	text1 = "_To you Havenites, all Ro are the same. The raiders who attacked you? Not Dhagans. Outsiders. Causing trouble. Drawing flames. Raasa Lawita has been killing them fast, and good for him._";
	text2 = "_We have nothing to do with that lot._";
	
begintalknode;
	state = 13;
	nextstate = 14;
	condition = 1;
	question = "_What do you know about the raiders who attacked me?_";
	text1 = "He laughs. _They tried to recruit us. Recruit all the Dhagan clans. Most of us rejected them. They asked us to run with a wolf in the hills, and we scared them off._";

begintalknode;
	state = 14;
	nextstate = 13;
	condition = 1;
	question = "_Wolf in the hills?_";
	text1 = "Now, just for a moment, Bhruck looks scared. He wasn't supposed to say that. He covers quickly. _I said wolves in the hill. The raiders going south had trained wolves. Not important._";
	text2 = "He is lying, but you won't be able to get more out of him.";

begintalknode;
	state = 13;
	nextstate = 15;
	condition = 1;
	question = "_Well, you're still raiders._";
	text1 = "_Yes, and we attacked you. You attacked us first. Now this is your claim. Don't care about that now. We're going to pack up our treasures and go._";

begintalknode;
	state = 13;
	nextstate = 15;
	condition = 1;
	question = "_So what now? I'm not skilled in Rokaj etiquette._";
	text1 = "_We attacked you, but you raided us first. That makes us even. No point in staying now. Haven can have this mess. We're going to pack up our treasures and go._";

begintalknode;
	state = 15;
	nextstate = -1;
	condition = 1;
	question = "_You aren't taking your treasures._";
	text1 = "_Don't push us, Haven. We've lost enough honor today. My chest of swag is legitimate loot in the eyes of the Ro, full of prestige. Leaving it would be too much of an insult to bear._";
	text2 = "The other raiders nod in unison.";
	
begintalknode;
	state = 15;
	nextstate = -1;
	condition = 1;
	question = "_Let me have your treasure, and you may go._";
	text1 = "He thinks about this. _No. Still too much dishonor to bear. But ... I have a key. It will let you into some treasure barns. Far better pickings there than in my little chest. Let us go and the key is yours._";
	code =
		sf(32,12,1);
	break;
	
begintalknode;
	state = 15;
	nextstate = -1;
	condition = 1;
	question = "_I'd probably better just kill you._ Attack.";
	text1 = "He draws his blade with blinding speed. _The time has been coming, Haven. Time for our tormentors to die. Didn't know I would become a real raider. Didn't know that the cleansing time would start today._";
	action = END_TALK;
	code =
		set_attitude(30012,10);
		ro_faction(-2);
		queen_faction(2);
		violence(3);
	break;
	
begintalknode;
	state = 15;
	nextstate = -1;
	condition = 1;
	question = "_Fine. Just go. And don't come back._";
	text1 = "It doesn't take long. The Claw Clan raiders pack up their gear and weapons. Two of them lift the treasure chest. They are all gone within a minute. You don't survive as a raider without being able to move fast.";
	text2 = "As promised, Bhruck tosses you a key.";
	text3 = "It seems like this quarry is yours now. You still need people to work it, though. Maybe someone in Azam can help.";
	action = END_TALK;
	code =
		if (gf(32,12) == 0)
			rs(2);
			else set_spec_item(5,1);
		sf(32,11,2);
		erase_char(30012);
		kill_object(96,1);
		ro_faction(2);
		queen_faction(-2);
		violence(-3);
	break;
	
//

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 40;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

	
//

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";


//

begintalknode;
	tag = 100;
	state = -1;
	nextstate = 100;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 100;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 130;
	state = -1;
	nextstate = 130;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 130;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 160;
	state = -1;
	nextstate = 160;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 160;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
		
//

begintalknode;
	tag = 190;
	state = -1;
	nextstate = 190;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 190;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
				